import request from "@/utils/request";

export const biProductLineData = () => {
  const deviceList = ref([]);
  const getDeviceList = async () => {
    await request({
      url: "/eam/eamAssetType/getList",
      method: "post",
      data: {
        assetKind: 1,
      },
    }).then(({ data }) => {
      const find = data.find((item: any) => item.assetTypeCode === "DL");
      request({
        url: "/eam/equAssetInfo/list",
        method: "post",
        data: {
          assetTypeId: find.id,
        },
      }).then((res) => {
        deviceList.value = res.data;
      });
    });
  };

  return {
    deviceList,
    getDeviceList,
  };
};
